﻿namespace ChinaUnicom.ViewModels
{
    using System;
    using System.Windows;

    public abstract class PageContext
    {
        protected Microsoft.Phone.Controls.PhoneApplicationFrame Root
        {
            get
            {
                return (Application.Current as App).RootFrame;
            }
        }

        protected void GoBack()
        {
            if (Root.CanGoBack)
            {
                Root.GoBack();
            }
        }

        protected bool Navigate(Uri source)
        {
            return Root.Navigate(source);
        }
    }
}
